<?php

extract(extractGet(), EXTR_PREFIX_ALL, 'c');

if(isset($c_id)){
 
//    $card = R::getRow( 'SELECT * FROM card WHERE id = ?', array($c_id) );
//        if(empty($card)){
//            
//            jsonErrorDie("Card with provided id does not exist.");
//            
//        } else {
//             jsonSuccessDie('card', $card);
//        }
    $card = R::load('card', $c_id);
    echo $card;
    foreach($card->ownLogList as $log){
        $log = R::load('log', $log->id);
        echo $log;
     
    }
    
 
//    foreach($cards as $test){
//        $card->ownLogList->id = $test;
//        echo $card;
//    }
    
    

   
   
}
//} else {
// 
//    $cards = R::getAll( 'SELECT * FROM card');
//       
//    jsonSuccessDie('cards', $cards);
//    
//}
